//
//  YxrToggleView.swift
//  TLCLockDemo
//
//  Created by run on 2024/8/17.
//

import SwiftUI

struct YxrToggleView: View {
    let title: String
    
    @Binding var isOn: Bool

    init(title: String, isOn: Binding<Bool>) {
        self.title = title
        _isOn = isOn
    }

    var body: some View {
        Toggle(isOn: $isOn) {
            Text(title)
                .font(.body)
                .foregroundColor(.secondary)
                .frame(minWidth: 80, alignment: .leading)
        }
        .padding(.horizontal, 20.0)
    }
}
